(function(b) {
    function a(g, f, h) {
        var e = "https://nonfill.svn.codeplex.com/svn/trunk/player/images/ccsearch.png";

        function c(i) {
            if (typeof g.getPlugin === "function") {
                g.getPlugin("dock").setButton("Search subtitles", d, e, e)
            }
            if (typeof g.addButton === "function") {
                g.addButton(e, "Search subtitles", d, "searchsub")
            }
        }

        function d() {
            var i = (g.getState() == "PLAYING") ? "1" : "0";
            var j = f.url;
            if (document.location.search) {
                j = j + document.location.search + "&"
            } else {
                j = j + "?"
            }
            j = j + "searchsub=1&autostart=" + i;
            window.open(j, "PlayerLink2", "width=800,height=500,resizable=yes,scrollbars=yes,menubar=no,location=no");
            if (g.getState() == "PLAYING") {
                g.pause()
            }
        }
        g.onReady(c)
    }
    if (typeof b().addButton === "function") {
        b().registerPlugin("searchsub", "6.0", a)
    } else {
        b().registerPlugin("searchsub", a)
    }
})(jwplayer);